Skip to content

feat(deploy): register laptop-agent in the services layer (#5769 M2) - #11168

Merged
dezren39 merged 1 commit into
mainfrom
queue/16852-5769-laptop-agent-definition
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/16852-5769-laptop-agent-definition

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

M2 remainder (#5769): laptop-agent services-layer definition

Queue task 16852, lane code-b. Prerequisite #10131 closed today (PR #11015): the reconciled daemon source lives at pkgs/laptop-agent/src/laptop_agent.py with pkgs/laptop-agent/package.nix. This PR gives that package its one services-layer definition in the deploy registry, so all three fleet daemons (queue-broker, secrets-broker, laptop-agent) are now declared in pkgs/deploy/services.nix.

Changes

  • pkgs/deploy/services.nix: new laptop-agent definition — package laptopAgent, entryPoint bin/laptop-agent, LAPTOP_AGENT_HOST/LAPTOP_AGENT_PORT environment mirroring the hand-written unit it replaces, port 4799, restart = "always" (the 2026-11-16 daemon-death lesson, code#2879: on-failure does not restart a clean exit), targets [ "laptop" ], class systemd.
    • healthCheck = null, deliberately: /health requires the daemon token (401 without it) and the deploy probe cannot present one. Same shape as session-proxy/mcpx; health is verified through the authenticated client (laptop-agent.py health) after activation. Recorded in a comment on the definition.
    • secrets = [ ]: the daemon token is a local file it reads itself at startup.
  • pkgs/deploy/default.nix: pass laptopAgent = callPackage ../laptop-agent/package.nix { } into the registry import.
  • pkgs/deploy/services.nix (queue-broker): definition brought in line with the live unit — QUEUE_BROKER_BACKEND = "turso" environment (live since the Turso replacement for the queue core: dedicated muse-queue DB + fleet queue-broker Turso backend #6741 Turso cutover, carried today by the 30-turso-queue.conf drop-in) and the Turso token named in secrets alongside the legacy Supabase key. Without this, a registry activation would not describe the service that actually runs.

Verification

Cutover (deploy activation per daemon, brokers first, laptop-agent last), superseded-unit archival, the darwin-nix fleet-brokers module disposition, and the #5343 close note proceed under task 16852 with evidence on #5769.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

One services-layer definition for laptop-agent in pkgs/deploy/services.nix (package pkgs/laptop-agent, reconciled in #10131), wired through pkgs/deploy/default.nix. restart=always per the 2026-11-16 daemon-death lesson (#2879); healthCheck=null because /health is token-gated (401) and the deploy probe cannot present a token - health is verified via the authenticated client after activation. Also bring the queue-broker definition in line with the live unit: QUEUE_BROKER_BACKEND=turso (#6741) and the Turso token named in secrets.
@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 08:54
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e21d0e3-dfb4-414b-bfdd-0231bfac14c5
Commits

Reviewing files that changed from the base of the PR and between faeee69 and 14200a2.

Files selected for processing: 2

  • pkgs/deploy/default.nix
  • pkgs/deploy/services.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T08:54:32.931614Z
We couldn’t complete this review. Comment @codex review to try again.
14200a2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant